Detection of liveness

ABSTRACT

Detecting a replay attack on a voice biometrics system comprises: receiving a speech signal from a voice source; generating and transmitting an ultrasound signal through a transducer of the device; detecting a reflection of the transmitted ultrasound signal; detecting Doppler shifts in the reflection of the generated ultrasound signal; and identifying whether the received speech signal is indicative of liveness of a speaker based on the detected Doppler shifts. The method further comprises: obtaining information about a position of the device; and adapting the generating and transmitting of the ultrasound signal based on the information about the position of the device.

This application is a continuation of U.S. patent application Ser. No. 16/156,623, filed Oct. 10, 2018, which claims priority to U.S. Provisional Patent Application Ser. No. 62/572,001, filed Oct. 13, 2017, and United Kingdom Patent Application No. 1801664.2, filed Feb. 1, 2018, each of which is incorporated by reference herein in its entirety.

TECHNICAL FIELD

Embodiments described herein relate to methods and devices for detecting liveness of a speaker. As one example, the liveness detection can be used for detecting a replay attack on a voice biometrics system.

BACKGROUND

Biometrics systems are becoming widely used. In a voice biometrics system, a user trains the system by providing samples of their speech during an enrolment phase. In subsequent use, the system is able to discriminate between the enrolled user and non-registered speakers. Voice biometrics systems can in principle be used to control access to a wide range of services and systems.

One way for a malicious party to attempt to defeat a voice biometrics system is to obtain a recording of the enrolled user's speech, and to play back the recording in an attempt to impersonate the enrolled user and to gain access to services that are intended to be restricted to the enrolled user.

This is referred to as a replay attack, or as a spoofing attack.

In a facial recognition, or other type of biometrics system, the system recognises a characteristic of the user. Again, one way for a malicious party to attempt to defeat such a biometrics system is to present the system with a photograph or video recording of the enrolled user.

SUMMARY

According to an aspect of the present invention, there is provided a method of liveness detection in a device. The method comprises: receiving a speech signal from a voice source; generating and transmitting an ultrasound signal through a transducer of the device; detecting a reflection of the transmitted ultrasound signal; detecting Doppler shifts in the reflection of the generated ultrasound signal; and identifying whether the received speech signal is indicative of liveness of a speaker based on the detected Doppler shifts. The method further comprises: obtaining information about a position of the device; and adapting the generating and transmitting of the ultrasound signal based on the information about the position of the device.

According to another aspect of the present invention, there is provided a system for liveness detection, the system being configured for performing the method of the first aspect.

According to another aspect of the present invention, there is provided a device comprising such a system. The device may comprise a mobile telephone, an audio player, a video player, a mobile computing platform, a games device, a remote controller device, a toy, a machine, or a home automation controller or a domestic appliance.

According to another aspect of the present invention, there is provided a computer program product, comprising a computer-readable tangible medium, and instructions for performing a method according to the first aspect.

According to another aspect of the present invention, there is provided a non-transitory computer readable storage medium having computer-executable instructions stored thereon that, when executed by processor circuitry, cause the processor circuitry to perform a method according to the first aspect. According to a further aspect, there is provided a device comprising the non-transitory computer readable storage medium. The device may comprise a mobile telephone, an audio player, a video player, a mobile computing platform, a games device, a remote controller device, a toy, a machine, or a home automation controller or a domestic appliance.

BRIEF DESCRIPTION OF DRAWINGS

For a better understanding of the present invention, and to show how it may be put into effect, reference will now be made to the accompanying drawings, in which:

FIG. 1 illustrates a smartphone;

FIG. 2 is a schematic diagram, illustrating the form of the smartphone;

FIG. 3 illustrates a situation in which a replay attack is being performed;

FIG. 4 is a flow chart illustrating a method of detecting liveness;

FIG. 5 illustrates a speech processing system, including a system for detecting liveness;

FIG. 6 is a flow chart illustrating a part of the method of detecting liveness;

FIGS. 7 a, 7 b, and 7 c illustrate various possible uses of smartphones;

FIG. 8 is a flow chart illustrating a part of the method of detecting liveness;

FIG. 9 is a flow chart illustrating a part of the method of detecting liveness;

FIG. 10 is a block diagram, illustrating a part of the system for detecting liveness; and

FIG. 11 illustrates results of the method of detecting liveness.

DETAILED DESCRIPTION OF EMBODIMENTS

The description below sets forth example embodiments according to this disclosure. Further example embodiments and implementations will be apparent to those having ordinary skill in the art. Further, those having ordinary skill in the art will recognize that various equivalent techniques may be applied in lieu of, or in conjunction with, the embodiments discussed below, and all such equivalents should be deemed as being encompassed by the present disclosure.

One example of the invention is illustrated with reference to its use in a smartphone, by way of example, though it will be appreciated that it may be implemented in any suitable device, as described in more detail below.

FIG. 1 illustrates a smartphone 10, having a microphone 12 for detecting ambient sounds. In normal use, the microphone is of course used for detecting the speech of a user who is holding the smartphone 10.

The smartphone 10 also has two loudspeakers 14, 16. The first loudspeaker 14 is located at the top of the smartphone 10, when it is held in its normal operating position for making a voice call, and is used for playing the sounds that are received from the remote party to the call.

The second loudspeaker 16 is located at the bottom of the smartphone 10, and is used for playing back media content from local or remote sources. Thus, the second loudspeaker 16 is used for playing back music that is stored on the smartphone 10 or sounds associated with videos that are being accessed over the internet.

The illustrated smartphone 10 also has two additional microphones 12 a, 12 b. The additional microphones, if present in the device, may be provided at any suitable location. In this illustrated device, one microphone 12 a is located at the top end of the front of the device, while another microphone 12 b is located at the top end of the side of the device.

FIG. 2 is a schematic diagram, illustrating the form of the smartphone 10.

Specifically, FIG. 2 shows various interconnected components of the smartphone 10. It will be appreciated that the smartphone 10 will in practice contain many other components, but the following description is sufficient for an understanding of the present invention.

Thus, FIG. 2 shows the microphone 12 mentioned above. In this particular illustrated embodiment, the smartphone 10 is provided with multiple microphones 12, 12 a, 12 b, etc. FIG. 2 also shows the loudspeakers 14, 16.

FIG. 2 also shows a memory 18, which may in practice be provided as a single component or as multiple components. The memory 18 is provided for storing data and program instructions.

FIG. 2 also shows a processor 20, which again may in practice be provided as a single component or as multiple components. For example, one component of the processor 20 may be an applications processor of the smartphone 10.

FIG. 2 also shows a transceiver 22, which is provided for allowing the smartphone 10 to communicate with external networks. For example, the transceiver 22 may include circuitry for establishing an internet connection over a WiFi local area network and/or over a cellular network.

FIG. 2 also shows audio processing circuitry 24, for performing operations on the audio signals detected by the microphone 12 as required. For example, the audio processing circuitry 24 may filter the audio signals or perform other signal processing operations.

The audio signal processing circuitry is also able to generate audio signals for playback through the loudspeakers 14, 16, as discussed in more detail below.

FIG. 2 also shows that the smartphone 10 may include one or more sensors 26. In certain embodiments, the sensor(s) may include any combination of the following: gyroscopes, accelerometers, proximity sensors, light level sensors, touch sensors, and a camera.

In this illustrated embodiment, the smartphone 10 is provided with voice biometric functionality, and with control functionality. Thus, the smartphone 10 is able to perform various functions in response to spoken commands from an enrolled user. The biometric functionality is able to distinguish between spoken commands from the enrolled user, and the same commands when spoken by a different person. Thus, certain embodiments of the invention relate to operation of a smartphone or another portable electronic device with some sort of voice operability, for example a tablet or laptop computer, a games console, a home control system, a home entertainment system, an in-vehicle entertainment system, a domestic appliance, or the like, in which the voice biometric functionality is performed in the device that is intended to carry out the spoken command. Certain other embodiments relate to systems in which the voice biometric functionality is performed on a smartphone or other device, which then transmits the commands to a separate device if the voice biometric functionality is able to confirm that the speaker was the enrolled user.

In some embodiments, while voice biometric functionality is performed on the smartphone 10 or other device that is located close to the user, the spoken commands are transmitted using the transceiver 22 to a remote speech recognition system, which determines the meaning of the spoken commands. For example, the speech recognition system may be located on one or more remote server in a cloud computing environment. Signals based on the meaning of the spoken commands are then returned to the smartphone 10 or other local device. In other embodiments, the speech recognition system is also located on the device 10.

One attempt to deceive a voice biometric system is to play a recording of an enrolled user's voice in a so-called replay or spoof attack.

FIG. 3 shows an example of a situation in which a replay attack is being performed. Thus, in FIG. 3 , the smartphone 10 is provided with voice biometric functionality. In this example, the smartphone 10 is in the possession, at least temporarily, of an attacker, who has another smartphone 30. The smartphone 30 has been used to record the voice of the enrolled user of the smartphone 10. The smartphone 30 is brought close to the microphone inlet 12 of the smartphone 10, and the recording of the enrolled user's voice is played back. If the voice biometric system is unable to determine that the enrolled user's voice that it recognises is a recording, the attacker will gain access to one or more services that are intended to be accessible only by the enrolled user.

At the same time, or separately, when the smartphone 10 is provided with a camera-based biometric functionality, such as a facial recognition system, an attacker may use the display of the smartphone 30 to show a photo or video of the enrolled user, in an attempt to defeat the facial recognition system.

Embodiments described herein therefore attempt to perform liveness detection, for example detecting the presence of a person speaking any voice sounds that are detected.

FIG. 4 is a flow chart, illustrating a method of liveness detection, for example for use in a biometrics system, and in this illustrated example used for detecting a replay attack on a voice biometrics system, and FIG. 5 is a block diagram illustrating functional blocks in one example of a speech processing system that includes the voice biometrics system.

Specifically, in step 50 in the method of FIG. 4 , a signal is received on an input 70 of the system shown in FIG. 5 . Thus, the input 70 may be connected to the microphone 12 shown in FIG. 1 or the multiple microphones 12, 12 a, 12 b, etc. shown in FIG. 2 .

The received signal is passed to a voice activity detector (VAD) 72, which detects when the received signal contains speech.

The received signal is also passed to a keyword detection block 74. If it is determined by the voice activity detector 72 that the received signal contains speech, the keyword detection block 74 is activated, and it acts to detect the presence of a predetermined keyword in the detected speech. For example, the speech processing system of a smartphone might as a default operate in a low power mode, reflecting the fact that speech processing will be required for only a small fraction of the operating life of the device. The speech processing system may then be taken out of the low-power mode by the user uttering the predetermined keyword or phrase, such as “Hello phone”.

The received signal is also passed to a speaker recognition block 76. If it is determined by the keyword detection block 74 that the predetermined keyword is present in the detected speech, the speaker recognition block 76 then attempts to determine whether the person who uttered the predetermined keyword is the registered user of the device and/or of a particular application on the device. Suitable biometric techniques are known for determining whether the speaker of the speech that is present in the received signal is the registered user.

If it is determined by the speaker recognition block 76 that the person who uttered the predetermined keyword is the registered user of the device and/or of the particular application on the device, then the received signal is passed to a speech processing block 78, which may be present on the device or may be located remotely, in the cloud. The speech processing block 78 then determines the content of the speech. If the speech contains a command, for example, then the speech processing block 78 generates a suitable signal for causing that command to be acted upon.

The system shown in FIG. 5 includes a mechanism for performing liveness detection, and hence for detecting whether the received signal containing speech has originated from a replay attack, as illustrated in FIG. 3 .

Thus, in step 52 of the method shown in FIG. 4 , an ultrasound signal is generated and transmitted, by the ultrasound generate and transmit block 80 shown in FIG. 5 . The ultrasound transmit block 80 may operate at all times. In other embodiments, the ultrasound transmit block 80 operates only when it receives an enable signal on its input 82. The enable signal may be generated, for example, when the voice activity detector 72 determines that the received signal contains speech, or when the keyword detection block 74 detects the presence of the predetermined keyword, or when the speaker recognition block 76 starts to perform a biometric technique to determine whether the person who uttered the predetermined keyword is the registered user.

The ultrasound signal may be a single tone sine wave, or other configurations may be used, for example a chirp signal. The frequency of the ultrasound signal may be selected to be relatively close to 20 kHz for transmittability reasons, while being high enough to ensure that it is not audible.

In step 54 of the method shown in FIG. 4 , a reflection of the generated ultrasound signal is detected.

In the system shown in FIG. 5 , a signal is received on an input 84, and passed to an ultrasound detection block 86. For example, the input 84 may be connected to one or more of the multiple microphones 12, 12 a, 12 b, etc. shown in FIG. 2 , to receive any signal detected thereby.

The received signal is passed to the ultrasound detection block 86, which may for example comprise one or more filter for selecting signals having a frequency that is close to the frequency of the ultrasound signal transmitted by the ultrasound transmit block 80. Reflected ultrasound signals may be Doppler shifted in their frequency, but the Doppler shifts are unlikely to be much more than 100 Hz, and so the ultrasound detection block 86 may comprise a filter for selecting signals having a frequency that is within 100 Hz of the frequency of the ultrasound signal transmitted by the ultrasound transmit block 80.

In step 56 of the method shown in FIG. 4 , the received ultrasound signal detected by the ultrasound detection block 86 is passed to a Doppler detect block 88, to detect Doppler shifts in the reflection of the generated ultrasound signal. Thus, the received reflected ultrasound signal is compared with the generated ultrasound signal to identify frequency shifts in the reflected signal that are caused by reflections off a moving surface, such as the face, and in particular the lips, of a person who is speaking to generate the detected speech signal.

In step 58 of the method shown in FIG. 4 , it is determined based on the detected Doppler shifts whether these Doppler shifts provide good evidence for the liveness of a person generating the detected speech.

In the illustrated embodiment shown in FIG. 5 , the output of the Doppler detect block 88 is applied to one input of a correlation block 90. The received audio signal on the input 70 is applied to another input of the correlation block 90. In an alternative embodiment, a signal generated by the voice activity detect block 72 is applied to the other input of the correlation block 90. The output of the correlation block 90 is applied to a determination block 92 shown in FIG. 5 .

If it is found by the correlation block 90 that there is a correlation between time periods in which Doppler shifts are detected in the reflection of the generated ultrasound signal, and time periods in which speech content is identified in the received speech signal, this indicates that the detected speech is generated by a live person moving their lips to generate the sound. If the degree of correlation is low, one possible reason for this may be that the detected speech is not generated by a live person moving their lips to generate the sound. One possible cause of this is that the detected speech is in fact generated by a replay attack.

Therefore, the determination block 92 produces an output signal that contains information about the liveness of the speaker, and hence about the likelihood that the detected speech was generated by a replay attack. This output signal is applied, in this illustrated embodiment, to the speaker recognition block 76, which is performing one or more voice biometrics process to determine whether the speaker is the registered user of the device. The speaker recognition block 76 can then use the output signal as one of several factors that it uses to determine whether the speaker is in fact the registered user of the device. For example, there may be one or more factors which indicate whether the detected speech is the speech of the registered user, and one or more factors which indicate whether the detected speech may have resulted from a replay attack.

In other examples, the liveness detection can be used for other purposes, for example for detecting an attempt to defeat a facial recognition system by presenting a still or moving image of an enrolled user.

As discussed in more detail below, the purpose of generating the ultrasound signal is to detect the movement of a speaker's face, and in particular the lips, while speaking. For this to operate successfully, it is advantageous that the ultrasound signal may be varied depending on information about the use of the device.

Thus, as described above, step 52 of the process shown in FIG. 4 involves generating and transmitting the ultrasound signal.

FIG. 6 is a flow chart, giving more detail about this step, in some embodiments. Specifically, in step 110 of the method, the system obtains information about a position of the device 10.

For example, obtaining information about a position of the device may comprise obtaining information about an orientation of the device. Information about the orientation of the device may for example be obtained from gyroscopes and/or accelerometers provided as sensors 26 in the device 10.

As one alternative, obtaining information about a position of the device may comprise obtaining information about a distance of the device from the voice source. Information about a distance of the device from the voice source may for example be obtained by detecting the levels of signals generated by the microphones 12, 12 a, 12 b. For example, a higher signal level from one microphone may indicate that the voice source is closer to that microphone than to one or more other microphone.

As another alternative, obtaining information about a position of the device may comprise obtaining information about a position of the device relative to a supposed speaker. Information about the position of the device relative to a supposed speaker may for example be obtained from one or more proximity sensor provided as a sensor 26 in the device 10. Information about the position of the device relative to a supposed speaker may also be obtained from one or more light level sensor provided as a sensor 26 in the device 10. Information about the position of the device relative to a supposed speaker may also be obtained from one or more touch sensor provided as a sensor 26 in the device 10, indicating how the device 10 is being held by a user. Information about the position of the device relative to a supposed speaker may also be obtained from a camera provided as a sensor 26 in the device 10, which can track the position of a user's face relative to the device 10.

Then, in step 112, the method involves adapting the generating and transmitting of the ultrasound signal based on the information about the position of the device.

Adapting the generating and transmitting of the ultrasound signal may for example comprise adjusting a transmit power of the ultrasound signal. As another example, when the device has multiple transducers 14, 16, adapting the generating and transmitting of the ultrasound signal may comprise selecting the one or more transducer in which the ultrasound signal is generated, with the intention that the ultrasound signal should be generated from a transducer that is close to the user's mouth in order to be able to detect movement of the user's lips.

For example, obtaining information about a position of the device may comprise obtaining information about a distance of the device from the voice source, and adapting the generating and transmitting of the ultrasound signal may comprise adjusting a transmit power of the ultrasound signal, with a higher power being used when the device is further from the voice source, at least for distances below a certain limit. This allows the device to generate ultrasound signals that produce clearly detectable reflections, without risking transmitting ultrasound energy when the device is close to the user's ear.

As another example, obtaining information about a position of the device may comprise obtaining information as to which of multiple loudspeaker transducers is closest to the voice source (for example based on signal levels at microphones placed located close to those transducers), and adapting the generating and transmitting of the ultrasound signal may comprise transmitting the ultrasound signal mainly or entirely from that transducer. This allows the device to generate ultrasound signals from the transducer that is closest to the sound source, and thereby increase the chance of detecting usable reflection signals.

Other possibilities relate to specific ways in which speakers may use the device.

Thus, for example, when the device 10 is a mobile phone comprising at least a first transducer 16 at a lower end of the device and a second transducer 14 at an upper end of the device, adapting the generating and transmitting of the ultrasound signal based on the information about the position of the device may comprise transmitting the ultrasound signal at a relatively low power from the first transducer 16 if the information about the position of the device indicates that the device 10 is being used in a close talk mode. Close talk will be understood as a use of a phone where the phone is positioned adjacent the side of a user's face, and where communication is using the close-range earpiece speaker, e.g. as with a “traditional” phone handset positioning. For example, the ultrasound signal may be transmitted at a level of 70-90 dB SPL at 1 cm in this mode.

The information about the position of the device may be considered to indicate that the device is being used in a close talk mode if, for example, accelerometers indicate that the device 10 is in an upright position, and proximity sensors detect that the device 10 is being held close to a surface that might be a user's face 120, as shown in FIG. 7 a.

More generally, adapting the generating and transmitting of the ultrasound signal based on the information about the position of the device may comprise transmitting the ultrasound signal from the second transducer if the information about the position of the device indicates that the device is being used in a generally vertical orientation.

As another example, when the device 10 is a mobile phone comprising at least a first transducer 16 at a lower end of the device and a second transducer 14 at an upper end of the device, adapting the generating and transmitting of the ultrasound signal based on the information about the position of the device may comprise transmitting the ultrasound signal at a relatively high power from the transducer 16 at the lower end of the device, if the information about the position of the device indicates that the device 10 may be being held by the user in front of their face 130, with the lower microphone 12 pointing towards them, i.e. in a “pizza slice” version of a near talk mode, as shown in FIG. 7 b.

Near-talk mode will be understood as where a phone is positioned in front of the user's face, and where use may be made of near-field loudspeakers and microphones. This position may be suitable for the purposes of a video call, e.g. using software products such as Skype™ from Microsoft or FaceTime™ from Apple. “Pizza slice” mode will be understood as a variation of near-talk mode, but where the phone is held in a relatively horizontal position (such that a microphone positioned at the lower end of the phone faces the user directly).

For example, the ultrasound signal may be transmitted at a level of 90-110 dB SPL at 1 cm in this mode.

The information about the position of the device may be considered to indicate that the device is being used in a “pizza slice” mode if, for example, accelerometers indicate that the device is in a horizontal position, and the signal level detected by the microphone 12 is higher than the signal level detected by the microphones 12 a, 12 b.

More generally, adapting the generating and transmitting of the ultrasound signal based on the information about the position of the device may comprise transmitting the ultrasound signal from the first transducer if the information about the position of the device indicates that the device is being used in a generally horizontal orientation.

In the variant of the near talk mode, in which the device is held by the user in front of their face, for example so that they can see the screen on the device while speaking, adapting the generating and transmitting of the ultrasound signal based on the information about the position of the device may comprise transmitting the ultrasound signal at a relatively high power from the transducer 14 at the upper end of the device, or from transducers at both ends of the device.

As another example, adapting the generating and transmitting of the ultrasound signal based on the information about the position of the device may comprise preventing transmission of the ultrasound signal if the information about the position of the device indicates that the device is being used in a far field mode, for example with the device 10 being placed on a surface 140 some distance from the user 142, as shown in FIG. 7 c . In this example, the information about the position of the device may indicate that the device is located more than a threshold distance (for example 50 cm) from the source of the sound.

This is because it may be determined that detecting the movement of a speaker's lips is only reliable enough for use when the indications are that the device may be being held close to the user's face.

As shown in FIG. 5 , and as described above, the output of the Doppler detect block 88 is applied to one input of a correlation block 90. The received audio signal on the input 70 is applied to another input of the correlation block 90. The correlation block 90 determines whether there is a correlation between time periods in which Doppler shifts are detected in the reflection of the generated ultrasound signal, and periods in which there is speech.

The aim is to confirm that any Doppler shifts that are detected in the received reflection of the generated ultrasound signal do result from facial movements of a speaker, and are not the result of spurious reflections from other moving objects.

FIG. 8 is a flow chart, illustrating a method performed in the correlation block 90.

First, it is determined in step 150, whether the detected Doppler shifts correspond to a general speech articulation rate. The articulation rate is the rate at which syllables are produced during speech, and it has been found that, for most speech, a typical articulation rate is in the range of 4-10 Hz. The facial movements of the speaker (for example movements of the speaker's lips, cheeks, and nostrils) will typically occur at the same rate. Thus, in step 150, it is determined whether the detected Doppler shifts correspond to facial movements at a frequency in the range of 4-10 Hz.

In step 152, it is determined whether the detected Doppler shifts correspond to an articulation rate of the current speech.

Thus, the articulation rate of the speech contained in the received audio signal is extracted in the correlation block 90. It is then determined whether the detected Doppler shifts correspond to facial movements at a frequency that corresponds to that extracted articulation rate.

If it is determined that the detected Doppler shifts correspond to facial movements at a frequency that corresponds to that extracted articulation rate, this can be taken as good evidence of liveness.

In a further possible step, in step 154 of the method shown in FIG. 8 , it is determined whether there is a correlation between detected Doppler shifts in the reflection of the generated ultrasound signal, and speech content of the received speech signal.

It is recognised that one issue with using ultrasound as described herein, is that there may be interfering sources of ambient ultrasound noise.

Therefore, FIG. 9 is a flow chart, illustrating one method performed in the Doppler detect block 88 and correlation block 90.

Specifically, in step 170, a level of ambient ultrasound noise is monitored. Then, in step 172, the operation of the voice biometrics system is adjusted based on the levels of the reflected ultrasound and monitored ambient ultrasound noise.

FIG. 10 is a block diagram, illustrating schematically the operation of the Doppler detect block 88 and correlation block 90. FIG. 11 illustrates signals obtained at different stages of the operation.

Specifically, the signal from one or microphone 12 is passed to a low pass filter 180, for isolating the audio frequency components (for example, below 20 kHz) of the detected signal. The resulting audio signal, in one example, is shown in FIG. 11(a).

The signal level of the audio signal is found in a block 182 that finds the absolute value of the signal. The resulting envelope signal, in the same example, is shown in FIG. 11(b).

The signal from the one or microphone 12 is also passed to a high pass filter 184, for isolating the ultrasound components (for example, above 20 kHz) of the detected signal. This may contain the wanted reflection of the generated ultrasound signal, but may also contain interfering ambient ultrasound noise.

The level of the ultrasound signal is determined by a level detector 186.

The ultrasound signal is then passed to a demodulation block 188, where it is downconverted to the audio band, and any Doppler shifted reflections are found. This is achieved by mixing the received ultrasound signal with the ultrasound signal that was generated and transmitted. The received ultrasound signal can be passed through a band pass filter before downconversion if required, in order to remove other ultrasound signals not originating from the transmitted signal. In addition, the output of the mixing step can be low-pass filtered.

The resulting signal, in one example, is shown in FIG. 11(c).

The signal level of the Doppler shifted reflected signal is found in a block 190 that finds the absolute value of the signal.

It can thus be seen from FIG. 11 that there is a correlation between the detected Doppler shifts in the reflection of the generated ultrasound signal, and speech content of the received speech signal.

In order to obtain a robust result, a correlation operation is performed, as shown at block 192 of FIG. 10 .

However, before performing the correlation, it is noted that, while the audio signal is effectively the result of the facial movements of the speaker, the Doppler shifts in the reflected ultrasound signal will result from the velocity of the facial movements.

Therefore, in some embodiments, either the audio signal is differentiated (for example by passing through a block 194 in the form of a band pass filter with a pass-band of, say, 10-200 Hz, an envelope block, or a differentiator), or the ultrasound signal is integrated (for example by passing through a block 196 in the form of a leaky integrator or a band pass filter with a pass-band of, say, 10-200 Hz).

The correlator 192 then performs a frame-by-frame cross correlation on the signals. If the correlation result Rxy is above a threshold then it is determined that there is enough of a correlation, between the detected Doppler shifts and the speech content of the received speech signal, to conclude that there is evidence of a live speaker, and hence that the speech may not result from a replay attack. If there is not good evidence of liveness of a speaker, this may be an indication that the received speech signal may be a product of a replay attack.

The operation of the system may be adjusted, based on a level of the reflected ultrasound and the monitored ambient ultrasound noise, as detected by the level detector 186.

For example, the reliance that is placed on the determination as to whether the received speech signal may be the result of a replay attack may be adjusted, based on the level of the monitored ambient ultrasound noise. The determination, as to whether the received speech signal may be the result of a replay attack, will typically be made based on more than one factor. It is recognised that the presence of large ambient ultrasound signals will impact on the reliability of this system, and so the reliance that is placed on the determination may be reduced, as the level of the monitored ambient ultrasound noise increases. More specifically, if the level of the monitored ambient ultrasound noise exceeds a first threshold level, the result of the correlation may be ignored completely, or the correlation may not be performed.

For lower levels of interference, the adjustment of the operation of the system may involve adapting the threshold correlation value that is used in determining whether there is enough of a correlation, between the detected Doppler shifts and the speech content of the received speech signal, to conclude that there is evidence of a live speaker. Specifically, for low levels of ultrasound interference, a high threshold correlation value can be used. For somewhat higher levels of ultrasound interference (still below the first threshold mentioned above), lower threshold correlation values can be used, to take account of the fact that the presence of interference will automatically reduce the correlation values obtained from the correlator 192.

The skilled person will recognise that some aspects of the above-described apparatus and methods may be embodied as processor control code, for example on a non-volatile carrier medium such as a disk, CD- or DVD-ROM, programmed memory such as read only memory (Firmware), or on a data carrier such as an optical or electrical signal carrier. For many applications embodiments of the invention will be implemented on a DSP (Digital Signal Processor), ASIC (Application Specific Integrated Circuit) or FPGA (Field Programmable Gate Array). Thus the code may comprise conventional program code or microcode or, for example code for setting up or controlling an ASIC or FPGA. The code may also comprise code for dynamically configuring re-configurable apparatus such as re-programmable logic gate arrays. Similarly the code may comprise code for a hardware description language such as Verilog™ or VHDL (Very high speed integrated circuit Hardware Description Language). As the skilled person will appreciate, the code may be distributed between a plurality of coupled components in communication with one another. Where appropriate, the embodiments may also be implemented using code running on a field-(re)programmable analogue array or similar device in order to configure analogue hardware.

Note that as used herein the term module shall be used to refer to a functional unit or block which may be implemented at least partly by dedicated hardware components such as custom defined circuitry and/or at least partly be implemented by one or more software processors or appropriate code running on a suitable general purpose processor or the like. A module may itself comprise other modules or functional units. A module may be provided by multiple components or sub-modules which need not be co-located and could be provided on different integrated circuits and/or running on different processors.

Embodiments may be implemented in a host device, especially a portable and/or battery powered host device such as a mobile computing device for example a laptop or tablet computer, a games console, a remote control device, a home automation controller or a domestic appliance including a domestic temperature or lighting control system, a toy, a machine such as a robot, an audio player, a video player, or a mobile telephone for example a smartphone.

It should be noted that the above-mentioned embodiments illustrate rather than limit the invention, and that those skilled in the art will be able to design many alternative embodiments without departing from the scope of the appended claims. The word “comprising” does not exclude the presence of elements or steps other than those listed in a claim, “a” or “an” does not exclude a plurality, and a single feature or other unit may fulfil the functions of several units recited in the claims. Any reference numerals or labels in the claims shall not be construed so as to limit their scope. 

The invention claimed is:
 1. A method of liveness detection in a device, the method comprising: receiving a speech signal from a voice source; generating and transmitting an ultrasound signal through a transducer of the device; detecting a reflection of the transmitted ultrasound signal; detecting Doppler shifts in the reflection of the generated ultrasound signal; and identifying whether the received speech signal is indicative of liveness of a speaker based on the detected Doppler shifts, and the method further comprising: obtaining information about a position of the device relative to the voice source; and adjusting the transmit power of the ultrasound signal based on the information about the position of the device relative to the voice source; wherein adjusting the transmit power comprises increasing the transmit power when the device is moved further away from the voice source.
 2. A method according to claim 1, wherein the device has multiple transducers, and wherein adapting the generating and transmitting of the ultrasound signal comprises: selecting the transducer in which the ultrasound signal is generated.
 3. A method according to claim 1, wherein obtaining information about a position of the device comprises obtaining information about an orientation of the device.
 4. A method according to claim 1, wherein the device is a mobile phone comprising at least a first transducer at a lower end of the device and a second transducer at an upper end of the device, and wherein adapting the generating and transmitting of the ultrasound signal based on the information about the position of the device comprises: transmitting the ultrasound signal at an intensity in the range of 90-110 dB SPL at 1 cm if the information about the position of the device indicates that the device is being used in a near talk mode.
 5. A method according to claim 4, wherein adapting the generating and transmitting of the ultrasound signal based on the information about the position of the device comprises: transmitting the ultrasound signal from the first transducer if the information about the position of the device indicates that the device is being used in a generally horizontal orientation.
 6. A method according to claim 4, wherein adapting the generating and transmitting of the ultrasound signal based on the information about the position of the device comprises: transmitting the ultrasound signal from the second transducer if the information about the position of the device indicates that the device is being used in a generally vertical orientation.
 7. A method according to claim 1, wherein adapting the generating and transmitting of the ultrasound signal based on the information about the position of the device comprises: preventing transmission of the ultrasound signal if the information about the position of the device indicates that the device is being used in a far field mode.
 8. A method according to claim 1, wherein adapting the generating and transmitting of the ultrasound signal comprises adjusting a transmit power of the ultrasound signal, with a higher power being used when the device is further from the voice source, for distances below a predetermined maximum distance.
 9. A method according to claim 1, wherein obtaining information about a position of the device comprises obtaining information as to which of multiple loudspeaker transducers is closest to the voice source, and adapting the generating and transmitting of the ultrasound signal comprises transmitting the ultrasound signal primarily or entirely from that loudspeaker.
 10. A method according to claim 1, comprising obtaining information about the position of the device from one or more of the following: gyroscopes, accelerometers, proximity sensors, light level sensors, touch sensors, sound level sensors, and a camera.
 11. A method according to claim 1, for use in a voice biometrics system, wherein identifying whether the received speech signal is indicative of liveness comprises determining whether the received speech signal may be a product of a replay attack.
 12. A system for liveness detection in a device, the system comprising: at least one microphone input, for receiving an audio signal from a microphone; and at least one transducer output, for transmitting a signal to an ultrasound, and the system being configured for: receiving a speech signal from the at least one microphone input; generating a control signal through the transducer output, for transmitting an ultrasound signal through a transducer of the device; detecting a reflection of the transmitted ultrasound signal; detecting Doppler shifts in the reflection of the generated ultrasound signal; and identifying whether the received speech signal is indicative of liveness of a speaker based on the detected Doppler shifts, and the method further comprising: obtaining information about a position of the device relative to the voice source; and adjusting the transmit power of the ultrasound signal based on the information about the position of the device relative to the voice source; wherein adjusting the transmit power comprises increasing the transmit power when the device is moved further away from the voice source.
 13. A non-transitory computer readable storage medium having computer-executable instructions stored thereon that, when executed by processor circuitry, cause the processor circuitry to perform a method according to claim
 1. 